package com.springboot_demo.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageVo {
    private Integer code; // 状态码
    private String message; // 提示信息
    private boolean success; // 是否成功
    private Object data; // 数据
    private Integer page; // 当前页
    private Long count; // 总记录数

    public PageVo(Object data, Integer page, long count) {
        this.code = 200;
        this.message = "请求成功";
        this.success = true;
        this.data = data;
        this.page = page;
        this.count = count;
    }
}
